package org.bultreebank.searching;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.w3c.dom.Document;

public interface SearchManager
{
	/**
	 * Returns a document with the content of the field specified, for
	 * the document identified by docID and added to the specified index
	 * @param docID - document ID
	 * @param index - user defined index ID
	 * @param fieldName - retrievable field ID
	 * @return
	 * @throws Exception
	 */
	public Map<String, List<String>> getFieldContentDocument(String index,
			String fieldName, String context) throws Exception;
	
	/**
	 * The search query is processed and the matching documents' IDs are
	 * added to the matchingDocIDs list, a Set of the document IDs and
	 * locations in the document is returned
	 * @param queryDoc - search query
	 * @param index - user defined index ID
	 * @return
	 * @throws Exception
	 */
	public  Map<String, Set<String>> search(Document queryDoc, String index)
	throws Exception;
}
